package com.zjs.service.impl;

import com.zjs.bean.Student;
import com.zjs.dao.StudentDao;
import com.zjs.dao.impl.StudentDaoImpl;
import com.zjs.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao = new StudentDaoImpl();

    @Override
    public List<Student> getStudentList(String stuName, String stuNo, Integer sex, Integer pageIndex, Integer pageSize) {
        return studentDao.getStudentList(stuName, stuNo, sex, pageIndex, pageSize);
    }

    @Override
    public Integer getStudentTotalCount(String stuName, String stuNo, Integer sex) {
        return studentDao.getStudentTotalCount(stuName, stuNo, sex);
    }

    @Override
    public int add(Student student) {
        return studentDao.add(student);
    }

    @Override
    public int delete(String stuId) {
        return studentDao.delete(stuId);
    }

    @Override
    public Student findById(String stuId) {
        return studentDao.findById(stuId);
    }

    @Override
    public int update(Student student) {
        return studentDao.update(student);
    }
}
